package com.example.mapper;

import com.example.entity.SysMbtiQuestion;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface SysMbtiQuestionMapper {
    @Select("SELECT * FROM sys_mbti_question")
    List<SysMbtiQuestion> findAll();

    List<SysMbtiQuestion> selectAll(SysMbtiQuestion sysMbtiQuestion);

    void insert(SysMbtiQuestion sysMbtiQuestion);

    void update(SysMbtiQuestion sysMbtiQuestion);

    @Delete("delete from `sys_mbti_question` where question_id=#{id}")
    void delete(Integer id);

    @Select("select * from sys_mbti_question where question_text = #{username}")
    SysMbtiQuestion selectbyusername(String username);

    List<SysMbtiQuestion> selectIds(@Param("list") List<Integer> questionId);
}
